CC = gcc
DEBUG = -g
OFLAGS = $(DEBUG) -O2 -Wall
ALLFLAGS = $(OFLAGS)

llib:
	@echo "moving libraries.."
	cp lib/*.h /usr/include

conf:
	$(CC) setdir.c $(ALLFLAGS) -o setdir
	@echo "Ora lancia ./setdir <directory_esistente_di_zephyr-os>"
	
all:
	@echo "compiling..."
	$(CC) build-chroot.c $(ALLFLAGS) -o build-chroot
	@echo "now type: 'make install'."
 
help:
	@echo "Per prima cosa lancia make lib, quindi make conf, make e make install"
	@echo "ATTENZIONE: dopo aver lanciato make conf dovrai settare la cartella di zephyr con ./setdir <cartella_zephyr>"

install:
	mv build-chroot /usr/bin
	@echo "All installed with success."

